﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DynamicQueryLib;
using LinqKit;
namespace AuditModel
{
    public class TeacherBL:ITeacherBL
    {
        #region ITeacherBL Members
        private AuditDBEntities db;
        public TeacherBL()
        {
            db = new AuditDBEntities();
        }
        //public IEnumerable<Teacher> GetTeachers(string annualEventID,int subjectID, string countyCode)
        //{
        //    List<Filter> filterList = new List<Filter>();
        //    if (annualEventID != "")
        //    {
        //        Filter f = new Filter();
        //        f.Connector = FilterConnectorType.AND;
        //        f.PropertyName = "AnnualEventID";
        //        f.PropertyType = typeof(string);
        //        f.Values.Add(annualEventID);
        //        f.Operator = RelationalOperators.Equals;
        //        filterList.Add(f);
        //    }
        //    if (subjectID>0)
        //    {
        //        Filter f = new Filter();
        //        f.Connector = FilterConnectorType.AND;
        //        f.PropertyName = "SubjectID";
        //        f.PropertyType = typeof(int);
        //        f.Values.Add(subjectID.ToString());
        //        f.Operator = RelationalOperators.Equals;
        //        filterList.Add(f);
        //    }
        //    if (countyCode.Trim()!= "")
        //    {
        //        Filter f = new Filter();
        //        f.Connector = FilterConnectorType.AND;
        //        f.PropertyName = "CountyCode";
        //        f.PropertyType = typeof(string);
        //        f.Values.Add(countyCode);
        //        f.Operator = RelationalOperators.Contains;
        //        filterList.Add(f);
        //    }
        //    var predicate = LambdaExpressionHelper<Teacher>.CreatePredicate<Teacher>(filterList);
        //    return db.Teachers.AsExpandable().Where(predicate).ToList();
        //}

        #endregion       
    }
}
